import random
while True:
    target = random.randint(1, 100)
    while True:
        guess = int(input("请输入数字(1-100): "))
        if guess > target:
            print("大了")
        elif guess < target:
            print("小了")
        else:
            print(f"恭喜猜中，本轮幸运数字：{target}")
            while True:
                choice = input("是否继续下一轮？(y/n): ")
                if choice == 'y':
                    print("\n开始新一局游戏！")
                    break
                elif choice == 'n':
                    print("游戏结束，谢谢游玩！")
                    exit()
                else:
                    print("请输入y或n！")
            break